pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    //计算指定范围内斐波那契数列中奇数项的和
    //threshold: 斐波那契数列项的最大值
    let mut sum = 0;
    let mut a = 1;
    let mut b = 1;

    //轮转求和，减小空间复杂度
    while a <= threshold {
        if a % 2 == 1 {   //只取奇数项
            sum += a;
        }
        let tmp = a + b;
        a = b;
        b = tmp;
    }
    sum
}
